
import { useJsonService, JsonData } from '@/serviceJson/jsonService'

class MainMock {
  error?: string | null
  loading?: boolean
  fetchJson?: (filePath: string) => Promise<JsonData | null>
  saveJson?: (filePath: string, data: JsonData) => void

  constructor() {
    const { error, loading, fetchJson, saveJson } = useJsonService();
    this.error = error.value
    this.loading = loading.value
    this.fetchJson = fetchJson
    this.saveJson = saveJson
  }
}

export default new MainMock()